package com.example.chcrm.entity.consignor;


import com.baomidou.mybatisplus.annotation.*;
import com.example.chcrm.entity.common.OperateRecord;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class CustomerType implements Serializable {

    /**
     * 主键ID
     */
    @TableId(value = "id",type = IdType.INPUT)
    private String id;


    @TableField("type_name")
    @NotBlank(message = "类型名称不能为空")
    private String typeName;    //类型名称
    private String explaind;      //备注
    private Integer status;       //状态 1:启用中 0：禁用中
    @TableField("is_deleted")
    @TableLogic(value = "0",delval = "-1")
    private Integer isDeleted;   //是否删除
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;    //添加时间
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    //----分页----
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;
    //----操作记录----
    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;

}
